{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ce98e63d-6dce-48f6-bd9a-dd1f38d43f65",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting tensorflow\n",
      "  Using cached tensorflow-2.17.0-cp312-cp312-win_amd64.whl.metadata (3.2 kB)\n",
      "Collecting tensorflow-intel==2.17.0 (from tensorflow)\n",
      "  Using cached tensorflow_intel-2.17.0-cp312-cp312-win_amd64.whl.metadata (5.0 kB)\n",
      "Collecting absl-py>=1.0.0 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached absl_py-2.1.0-py3-none-any.whl.metadata (2.3 kB)\n",
      "Collecting astunparse>=1.6.0 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached astunparse-1.6.3-py2.py3-none-any.whl.metadata (4.4 kB)\n",
      "Collecting flatbuffers>=24.3.25 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)\n",
      "Collecting gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached gast-0.6.0-py3-none-any.whl.metadata (1.3 kB)\n",
      "Collecting google-pasta>=0.1.1 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached google_pasta-0.2.0-py3-none-any.whl.metadata (814 bytes)\n",
      "Requirement already satisfied: h5py>=3.10.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (3.11.0)\n",
      "Collecting libclang>=13.0.0 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached libclang-18.1.1-py2.py3-none-win_amd64.whl.metadata (5.3 kB)\n",
      "Collecting ml-dtypes<0.5.0,>=0.3.1 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached ml_dtypes-0.4.1-cp312-cp312-win_amd64.whl.metadata (20 kB)\n",
      "Collecting opt-einsum>=2.3.2 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached opt_einsum-3.4.0-py3-none-any.whl.metadata (6.3 kB)\n",
      "Requirement already satisfied: packaging in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (23.2)\n",
      "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (3.20.3)\n",
      "Requirement already satisfied: requests<3,>=2.21.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (2.32.2)\n",
      "Requirement already satisfied: setuptools in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (69.5.1)\n",
      "Requirement already satisfied: six>=1.12.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (1.16.0)\n",
      "Collecting termcolor>=1.1.0 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached termcolor-2.5.0-py3-none-any.whl.metadata (6.1 kB)\n",
      "Requirement already satisfied: typing-extensions>=3.6.6 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (4.11.0)\n",
      "Requirement already satisfied: wrapt>=1.11.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (1.14.1)\n",
      "Collecting grpcio<2.0,>=1.24.3 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached grpcio-1.67.0-cp312-cp312-win_amd64.whl.metadata (4.0 kB)\n",
      "Collecting tensorboard<2.18,>=2.17 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached tensorboard-2.17.1-py3-none-any.whl.metadata (1.6 kB)\n",
      "Collecting keras>=3.2.0 (from tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached keras-3.6.0-py3-none-any.whl.metadata (5.8 kB)\n",
      "Requirement already satisfied: numpy<2.0.0,>=1.26.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorflow-intel==2.17.0->tensorflow) (1.26.4)\n",
      "Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from astunparse>=1.6.0->tensorflow-intel==2.17.0->tensorflow) (0.43.0)\n",
      "Requirement already satisfied: rich in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow) (13.3.5)\n",
      "Collecting namex (from keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached namex-0.0.8-py3-none-any.whl.metadata (246 bytes)\n",
      "Collecting optree (from keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached optree-0.13.0-cp312-cp312-win_amd64.whl.metadata (48 kB)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.17.0->tensorflow) (2.0.4)\n",
      "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.17.0->tensorflow) (3.7)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.17.0->tensorflow) (2.2.2)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorflow-intel==2.17.0->tensorflow) (2024.7.4)\n",
      "Requirement already satisfied: markdown>=2.6.8 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorboard<2.18,>=2.17->tensorflow-intel==2.17.0->tensorflow) (3.4.1)\n",
      "Collecting tensorboard-data-server<0.8.0,>=0.7.0 (from tensorboard<2.18,>=2.17->tensorflow-intel==2.17.0->tensorflow)\n",
      "  Using cached tensorboard_data_server-0.7.2-py3-none-any.whl.metadata (1.1 kB)\n",
      "Requirement already satisfied: werkzeug>=1.0.1 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from tensorboard<2.18,>=2.17->tensorflow-intel==2.17.0->tensorflow) (3.0.3)\n",
      "Requirement already satisfied: MarkupSafe>=2.1.1 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from werkzeug>=1.0.1->tensorboard<2.18,>=2.17->tensorflow-intel==2.17.0->tensorflow) (2.1.3)\n",
      "Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from rich->keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow) (2.2.0)\n",
      "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from rich->keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow) (2.15.1)\n",
      "Requirement already satisfied: mdurl~=0.1 in c:\\users\\administrator\\anaconda3\\lib\\site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich->keras>=3.2.0->tensorflow-intel==2.17.0->tensorflow) (0.1.0)\n",
      "Using cached tensorflow-2.17.0-cp312-cp312-win_amd64.whl (2.0 kB)\n",
      "Downloading tensorflow_intel-2.17.0-cp312-cp312-win_amd64.whl (385.2 MB)\n",
      "   ---------------------------------------- 0.0/385.2 MB ? eta -:--:--\n",
      "   ---------------------------------------- 0.0/385.2 MB 217.9 kB/s eta 0:29:28\n",
      "   ---------------------------------------- 0.0/385.2 MB 259.2 kB/s eta 0:24:46\n",
      "   ---------------------------------------- 0.1/385.2 MB 409.6 kB/s eta 0:15:41\n",
      "   ---------------------------------------- 0.1/385.2 MB 717.5 kB/s eta 0:08:57\n",
      "   ---------------------------------------- 0.2/385.2 MB 1.2 MB/s eta 0:05:34\n",
      "   ---------------------------------------- 0.5/385.2 MB 1.8 MB/s eta 0:03:29\n",
      "   ---------------------------------------- 0.7/385.2 MB 2.3 MB/s eta 0:02:49\n",
      "   ---------------------------------------- 0.9/385.2 MB 2.5 MB/s eta 0:02:36\n",
      "   ---------------------------------------- 1.3/385.2 MB 3.3 MB/s eta 0:01:56\n",
      "   ---------------------------------------- 2.1/385.2 MB 4.9 MB/s eta 0:01:19\n",
      "   ---------------------------------------- 3.2/385.2 MB 6.8 MB/s eta 0:00:57\n",
      "    --------------------------------------- 5.4/385.2 MB 10.4 MB/s eta 0:00:37\n",
      "    --------------------------------------- 9.1/385.2 MB 16.1 MB/s eta 0:00:24\n",
      "   - -------------------------------------- 13.2/385.2 MB 72.6 MB/s eta 0:00:06\n",
      "   - -------------------------------------- 14.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   - -------------------------------------- 14.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   - -------------------------------------- 14.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   - -------------------------------------- 14.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   - -------------------------------------- 14.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   - -------------------------------------- 14.4/385.2 MB 27.3 MB/s eta 0:00:14\n",
      "   - -------------------------------------- 14.4/385.2 MB 27.3 MB/s eta 0:00:14\n",
      "   - -------------------------------------- 14.4/385.2 MB 27.3 MB/s eta 0:00:14\n",
      "   - -------------------------------------- 14.5/385.2 MB 21.1 MB/s eta 0:00:18\n",
      "   - -------------------------------------- 14.5/385.2 MB 18.7 MB/s eta 0:00:20\n",
      "   - -------------------------------------- 14.5/385.2 MB 17.2 MB/s eta 0:00:22\n",
      "   - -------------------------------------- 14.5/385.2 MB 17.2 MB/s eta 0:00:22\n",
      "   - -------------------------------------- 14.6/385.2 MB 15.6 MB/s eta 0:00:24\n",
      "   - -------------------------------------- 14.7/385.2 MB 14.2 MB/s eta 0:00:27\n",
      "   - -------------------------------------- 14.8/385.2 MB 13.4 MB/s eta 0:00:28\n",
      "   - -------------------------------------- 14.8/385.2 MB 13.4 MB/s eta 0:00:28\n",
      "   - -------------------------------------- 15.1/385.2 MB 12.6 MB/s eta 0:00:30\n",
      "   - -------------------------------------- 15.3/385.2 MB 11.7 MB/s eta 0:00:32\n",
      "   - -------------------------------------- 15.4/385.2 MB 10.9 MB/s eta 0:00:34\n",
      "   - -------------------------------------- 15.6/385.2 MB 10.4 MB/s eta 0:00:36\n",
      "   - -------------------------------------- 15.7/385.2 MB 10.4 MB/s eta 0:00:36\n",
      "   - -------------------------------------- 15.9/385.2 MB 9.8 MB/s eta 0:00:38\n",
      "   - -------------------------------------- 16.1/385.2 MB 9.4 MB/s eta 0:00:40\n",
      "   - -------------------------------------- 16.4/385.2 MB 9.0 MB/s eta 0:00:42\n",
      "   - -------------------------------------- 16.5/385.2 MB 8.6 MB/s eta 0:00:43\n",
      "   - -------------------------------------- 16.8/385.2 MB 8.5 MB/s eta 0:00:44\n",
      "   - -------------------------------------- 17.1/385.2 MB 8.1 MB/s eta 0:00:46\n",
      "   - -------------------------------------- 17.5/385.2 MB 7.9 MB/s eta 0:00:47\n",
      "   - -------------------------------------- 17.8/385.2 MB 7.5 MB/s eta 0:00:49\n",
      "   - -------------------------------------- 18.0/385.2 MB 7.3 MB/s eta 0:00:51\n",
      "   - -------------------------------------- 18.1/385.2 MB 7.2 MB/s eta 0:00:52\n",
      "   - -------------------------------------- 19.1/385.2 MB 7.0 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.9 MB/s eta 0:00:53\n",
      "   -- ------------------------------------- 21.7/385.2 MB 6.0 MB/s eta 0:01:02\n",
      "   -- ------------------------------------- 21.8/385.2 MB 5.7 MB/s eta 0:01:04\n",
      "   -- ------------------------------------- 21.8/385.2 MB 5.6 MB/s eta 0:01:06\n",
      "   -- ------------------------------------- 21.8/385.2 MB 5.6 MB/s eta 0:01:06\n",
      "   -- ------------------------------------- 21.8/385.2 MB 5.4 MB/s eta 0:01:08\n",
      "   -- ------------------------------------- 21.9/385.2 MB 5.3 MB/s eta 0:01:09\n",
      "   -- ------------------------------------- 22.0/385.2 MB 5.1 MB/s eta 0:01:11\n",
      "   -- ------------------------------------- 22.1/385.2 MB 5.0 MB/s eta 0:01:14\n",
      "   -- ------------------------------------- 22.1/385.2 MB 5.0 MB/s eta 0:01:14\n",
      "   -- ------------------------------------- 22.3/385.2 MB 4.8 MB/s eta 0:01:15\n",
      "   -- ------------------------------------- 22.5/385.2 MB 4.7 MB/s eta 0:01:18\n",
      "   -- ------------------------------------- 22.7/385.2 MB 4.6 MB/s eta 0:01:20\n",
      "   -- ------------------------------------- 22.9/385.2 MB 4.5 MB/s eta 0:01:22\n",
      "   -- ------------------------------------- 22.9/385.2 MB 4.4 MB/s eta 0:01:23\n",
      "   -- ------------------------------------- 23.1/385.2 MB 4.4 MB/s eta 0:01:23\n",
      "   -- ------------------------------------- 23.4/385.2 MB 4.3 MB/s eta 0:01:25\n",
      "   -- ------------------------------------- 23.7/385.2 MB 4.2 MB/s eta 0:01:27\n",
      "   -- ------------------------------------- 24.0/385.2 MB 4.1 MB/s eta 0:01:29\n",
      "   -- ------------------------------------- 24.1/385.2 MB 4.0 MB/s eta 0:01:30\n",
      "   -- ------------------------------------- 24.5/385.2 MB 4.0 MB/s eta 0:01:30\n",
      "   -- ------------------------------------- 24.9/385.2 MB 5.2 MB/s eta 0:01:10\n",
      "   -- ------------------------------------- 25.4/385.2 MB 5.4 MB/s eta 0:01:07\n",
      "   -- ------------------------------------- 25.7/385.2 MB 5.5 MB/s eta 0:01:05\n",
      "   -- ------------------------------------- 26.1/385.2 MB 5.6 MB/s eta 0:01:05\n",
      "   -- ------------------------------------- 26.7/385.2 MB 5.9 MB/s eta 0:01:01\n",
      "   -- ------------------------------------- 27.4/385.2 MB 6.2 MB/s eta 0:00:58\n",
      "   -- ------------------------------------- 28.2/385.2 MB 6.5 MB/s eta 0:00:55\n",
      "   -- ------------------------------------- 28.8/385.2 MB 6.5 MB/s eta 0:00:55\n",
      "   --- ------------------------------------ 29.2/385.2 MB 6.5 MB/s eta 0:00:55\n",
      "   --- ------------------------------------ 30.2/385.2 MB 6.4 MB/s eta 0:00:56\n",
      "   --- ------------------------------------ 31.2/385.2 MB 6.2 MB/s eta 0:00:58\n",
      "   --- ------------------------------------ 31.7/385.2 MB 6.1 MB/s eta 0:00:59\n",
      "   --- ------------------------------------ 32.1/385.2 MB 8.1 MB/s eta 0:00:44\n",
      "   --- ------------------------------------ 32.4/385.2 MB 9.2 MB/s eta 0:00:39\n",
      "   --- ------------------------------------ 36.8/385.2 MB 21.1 MB/s eta 0:00:17\n",
      "   ---- ----------------------------------- 39.0/385.2 MB 31.2 MB/s eta 0:00:12\n",
      "   ---- ----------------------------------- 39.0/385.2 MB 31.2 MB/s eta 0:00:12\n",
      "   ---- ----------------------------------- 42.3/385.2 MB 46.7 MB/s eta 0:00:08\n",
      "   ---- ----------------------------------- 45.5/385.2 MB 50.1 MB/s eta 0:00:07\n",
      "   ----- ---------------------------------- 50.4/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   ----- --------------------------------- 53.9/385.2 MB 108.8 MB/s eta 0:00:04\n",
      "   ----- ---------------------------------- 56.6/385.2 MB 81.8 MB/s eta 0:00:05\n",
      "   ------ --------------------------------- 60.4/385.2 MB 93.0 MB/s eta 0:00:04\n",
      "   ------ --------------------------------- 64.4/385.2 MB 73.1 MB/s eta 0:00:05\n",
      "   ------- -------------------------------- 68.5/385.2 MB 93.0 MB/s eta 0:00:04\n",
      "   ------- -------------------------------- 71.9/385.2 MB 93.9 MB/s eta 0:00:04\n",
      "   ------- -------------------------------- 76.1/385.2 MB 93.9 MB/s eta 0:00:04\n",
      "   -------- ------------------------------- 79.7/385.2 MB 81.8 MB/s eta 0:00:04\n",
      "   -------- ------------------------------- 83.1/385.2 MB 81.8 MB/s eta 0:00:04\n",
      "   -------- ------------------------------- 86.4/385.2 MB 81.8 MB/s eta 0:00:04\n",
      "   --------- ------------------------------ 88.5/385.2 MB 73.1 MB/s eta 0:00:05\n",
      "   --------- ------------------------------ 88.5/385.2 MB 73.1 MB/s eta 0:00:05\n",
      "   --------- ------------------------------ 88.5/385.2 MB 73.1 MB/s eta 0:00:05\n",
      "   --------- ------------------------------ 88.5/385.2 MB 36.4 MB/s eta 0:00:09\n",
      "   --------- ------------------------------ 88.5/385.2 MB 36.4 MB/s eta 0:00:09\n",
      "   --------- ------------------------------ 88.5/385.2 MB 36.4 MB/s eta 0:00:09\n",
      "   --------- ------------------------------ 88.5/385.2 MB 36.4 MB/s eta 0:00:09\n",
      "   --------- ------------------------------ 88.7/385.2 MB 22.6 MB/s eta 0:00:14\n",
      "   --------- ------------------------------ 88.7/385.2 MB 22.6 MB/s eta 0:00:14\n",
      "   --------- ------------------------------ 88.7/385.2 MB 20.5 MB/s eta 0:00:15\n",
      "   --------- ------------------------------ 88.7/385.2 MB 18.2 MB/s eta 0:00:17\n",
      "   --------- ------------------------------ 88.8/385.2 MB 16.8 MB/s eta 0:00:18\n",
      "   --------- ------------------------------ 88.9/385.2 MB 15.2 MB/s eta 0:00:20\n",
      "   --------- ------------------------------ 88.9/385.2 MB 15.2 MB/s eta 0:00:20\n",
      "   --------- ------------------------------ 89.0/385.2 MB 13.9 MB/s eta 0:00:22\n",
      "   --------- ------------------------------ 89.1/385.2 MB 13.1 MB/s eta 0:00:23\n",
      "   --------- ------------------------------ 89.5/385.2 MB 12.4 MB/s eta 0:00:24\n",
      "   --------- ------------------------------ 89.5/385.2 MB 12.4 MB/s eta 0:00:24\n",
      "   --------- ------------------------------ 89.7/385.2 MB 11.5 MB/s eta 0:00:26\n",
      "   --------- ------------------------------ 89.9/385.2 MB 10.9 MB/s eta 0:00:28\n",
      "   --------- ------------------------------ 90.0/385.2 MB 10.2 MB/s eta 0:00:29\n",
      "   --------- ------------------------------ 90.0/385.2 MB 10.2 MB/s eta 0:00:29\n",
      "   --------- ------------------------------ 90.2/385.2 MB 9.6 MB/s eta 0:00:31\n",
      "   --------- ------------------------------ 90.4/385.2 MB 9.2 MB/s eta 0:00:32\n",
      "   --------- ------------------------------ 90.7/385.2 MB 8.7 MB/s eta 0:00:34\n",
      "   --------- ------------------------------ 90.7/385.2 MB 8.7 MB/s eta 0:00:34\n",
      "   --------- ------------------------------ 90.9/385.2 MB 8.5 MB/s eta 0:00:35\n",
      "   --------- ------------------------------ 91.2/385.2 MB 8.1 MB/s eta 0:00:37\n",
      "   --------- ------------------------------ 91.5/385.2 MB 7.7 MB/s eta 0:00:39\n",
      "   --------- ------------------------------ 91.7/385.2 MB 7.4 MB/s eta 0:00:40\n",
      "   --------- ------------------------------ 91.9/385.2 MB 7.4 MB/s eta 0:00:40\n",
      "   --------- ------------------------------ 92.3/385.2 MB 7.2 MB/s eta 0:00:41\n",
      "   --------- ------------------------------ 92.7/385.2 MB 6.9 MB/s eta 0:00:43\n",
      "   --------- ------------------------------ 93.1/385.2 MB 6.6 MB/s eta 0:00:45\n",
      "   --------- ------------------------------ 93.3/385.2 MB 6.4 MB/s eta 0:00:46\n",
      "   --------- ------------------------------ 93.6/385.2 MB 6.5 MB/s eta 0:00:45\n",
      "   --------- ------------------------------ 94.1/385.2 MB 6.2 MB/s eta 0:00:47\n",
      "   --------- ------------------------------ 94.4/385.2 MB 6.0 MB/s eta 0:00:49\n",
      "   --------- ------------------------------ 94.4/385.2 MB 5.8 MB/s eta 0:00:50\n",
      "   ---------- ----------------------------- 97.1/385.2 MB 5.8 MB/s eta 0:00:50\n",
      "   ---------- ----------------------------- 99.8/385.2 MB 10.1 MB/s eta 0:00:29\n",
      "   ---------- ---------------------------- 102.2/385.2 MB 21.8 MB/s eta 0:00:13\n",
      "   ---------- ---------------------------- 105.4/385.2 MB 65.6 MB/s eta 0:00:05\n",
      "   ---------- ---------------------------- 108.4/385.2 MB 65.6 MB/s eta 0:00:05\n",
      "   ----------- --------------------------- 110.5/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   ----------- --------------------------- 113.5/385.2 MB 54.7 MB/s eta 0:00:05\n",
      "   ----------- --------------------------- 115.8/385.2 MB 59.8 MB/s eta 0:00:05\n",
      "   ----------- --------------------------- 118.0/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   ------------ -------------------------- 121.0/385.2 MB 65.2 MB/s eta 0:00:05\n",
      "   ------------ -------------------------- 124.0/385.2 MB 65.6 MB/s eta 0:00:04\n",
      "   ------------ -------------------------- 126.7/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   ------------- ------------------------- 129.8/385.2 MB 65.6 MB/s eta 0:00:04\n",
      "   ------------- ------------------------- 133.0/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   ------------- ------------------------- 136.1/385.2 MB 65.2 MB/s eta 0:00:04\n",
      "   -------------- ------------------------ 138.8/385.2 MB 59.8 MB/s eta 0:00:05\n",
      "   -------------- ------------------------ 141.5/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   -------------- ------------------------ 144.5/385.2 MB 59.5 MB/s eta 0:00:05\n",
      "   -------------- ------------------------ 147.5/385.2 MB 65.6 MB/s eta 0:00:04\n",
      "   --------------- ----------------------- 150.0/385.2 MB 65.6 MB/s eta 0:00:04\n",
      "   --------------- ----------------------- 152.7/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   --------------- ----------------------- 155.1/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   --------------- ----------------------- 157.9/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ---------------- ---------------------- 161.0/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ---------------- ---------------------- 164.0/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ---------------- ---------------------- 167.1/385.2 MB 72.6 MB/s eta 0:00:04\n",
      "   ----------------- --------------------- 169.7/385.2 MB 59.8 MB/s eta 0:00:04\n",
      "   ----------------- --------------------- 172.7/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ----------------- --------------------- 175.5/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ------------------ -------------------- 178.8/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ------------------ -------------------- 181.9/385.2 MB 65.6 MB/s eta 0:00:04\n",
      "   ------------------ -------------------- 184.8/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   ------------------- ------------------- 188.0/385.2 MB 65.2 MB/s eta 0:00:04\n",
      "   ------------------- ------------------- 190.8/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ------------------- ------------------- 193.8/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ------------------- ------------------- 196.6/385.2 MB 65.2 MB/s eta 0:00:03\n",
      "   -------------------- ------------------ 199.3/385.2 MB 72.6 MB/s eta 0:00:03\n",
      "   -------------------- ------------------ 201.8/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   -------------------- ------------------ 205.2/385.2 MB 59.5 MB/s eta 0:00:04\n",
      "   --------------------- ----------------- 208.5/385.2 MB 59.5 MB/s eta 0:00:03\n",
      "   --------------------- ----------------- 211.5/385.2 MB 73.1 MB/s eta 0:00:03\n",
      "   --------------------- ----------------- 214.6/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ---------------------- ---------------- 217.8/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ---------------------- ---------------- 221.1/385.2 MB 65.2 MB/s eta 0:00:03\n",
      "   ---------------------- ---------------- 224.3/385.2 MB 65.2 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 227.6/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 230.6/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 233.3/385.2 MB 65.6 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 234.9/385.2 MB 59.8 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 234.9/385.2 MB 59.8 MB/s eta 0:00:03\n",
      "   ----------------------- --------------- 235.8/385.2 MB 40.9 MB/s eta 0:00:04\n",
      "   ----------------------- --------------- 236.3/385.2 MB 34.4 MB/s eta 0:00:05\n",
      "   ----------------------- --------------- 236.9/385.2 MB 31.2 MB/s eta 0:00:05\n",
      "   ------------------------ -------------- 237.6/385.2 MB 29.7 MB/s eta 0:00:05\n",
      "   ------------------------ -------------- 238.3/385.2 MB 26.2 MB/s eta 0:00:06\n",
      "   ------------------------ -------------- 238.6/385.2 MB 24.2 MB/s eta 0:00:07\n",
      "   ------------------------ -------------- 239.1/385.2 MB 21.8 MB/s eta 0:00:07\n",
      "   ------------------------ -------------- 239.4/385.2 MB 20.5 MB/s eta 0:00:08\n",
      "   ------------------------ -------------- 239.7/385.2 MB 19.3 MB/s eta 0:00:08\n",
      "   ------------------------ -------------- 240.7/385.2 MB 17.7 MB/s eta 0:00:09\n",
      "   ------------------------ -------------- 242.7/385.2 MB 17.2 MB/s eta 0:00:09\n",
      "   ------------------------ -------------- 245.1/385.2 MB 17.7 MB/s eta 0:00:08\n",
      "   ------------------------- ------------- 247.4/385.2 MB 24.3 MB/s eta 0:00:06\n",
      "   ------------------------- ------------- 249.6/385.2 MB 34.4 MB/s eta 0:00:04\n",
      "   ------------------------- ------------- 251.4/385.2 MB 46.7 MB/s eta 0:00:03\n",
      "   ------------------------- ------------- 253.6/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   ------------------------- ------------- 256.3/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   -------------------------- ------------ 258.0/385.2 MB 46.7 MB/s eta 0:00:03\n",
      "   -------------------------- ------------ 260.0/385.2 MB 46.7 MB/s eta 0:00:03\n",
      "   -------------------------- ------------ 262.0/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   -------------------------- ------------ 264.2/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   -------------------------- ------------ 266.4/385.2 MB 46.7 MB/s eta 0:00:03\n",
      "   --------------------------- ----------- 268.1/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   --------------------------- ----------- 270.5/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   --------------------------- ----------- 272.6/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   --------------------------- ----------- 274.9/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   ---------------------------- ---------- 277.0/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   ---------------------------- ---------- 279.4/385.2 MB 46.7 MB/s eta 0:00:03\n",
      "   ---------------------------- ---------- 281.9/385.2 MB 50.1 MB/s eta 0:00:03\n",
      "   ---------------------------- ---------- 284.1/385.2 MB 50.4 MB/s eta 0:00:03\n",
      "   ---------------------------- ---------- 286.3/385.2 MB 46.9 MB/s eta 0:00:03\n",
      "   ----------------------------- --------- 288.6/385.2 MB 50.1 MB/s eta 0:00:02\n",
      "   ----------------------------- --------- 291.2/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ----------------------------- --------- 293.5/385.2 MB 54.7 MB/s eta 0:00:02\n",
      "   ----------------------------- --------- 295.8/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ------------------------------ -------- 297.9/385.2 MB 46.7 MB/s eta 0:00:02\n",
      "   ------------------------------ -------- 300.4/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ------------------------------ -------- 302.8/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ------------------------------ -------- 305.2/385.2 MB 54.4 MB/s eta 0:00:02\n",
      "   ------------------------------- ------- 307.3/385.2 MB 54.4 MB/s eta 0:00:02\n",
      "   ------------------------------- ------- 309.6/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ------------------------------- ------- 312.0/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   ------------------------------- ------- 313.8/385.2 MB 50.1 MB/s eta 0:00:02\n",
      "   -------------------------------- ------ 316.1/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   -------------------------------- ------ 318.3/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   -------------------------------- ------ 320.8/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   -------------------------------- ------ 323.2/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   -------------------------------- ------ 325.7/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   --------------------------------- ----- 327.9/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   --------------------------------- ----- 330.3/385.2 MB 50.4 MB/s eta 0:00:02\n",
      "   --------------------------------- ----- 332.6/385.2 MB 50.1 MB/s eta 0:00:02\n",
      "   --------------------------------- ----- 334.8/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------- ---- 337.0/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------- ---- 339.2/385.2 MB 50.1 MB/s eta 0:00:01\n",
      "   ---------------------------------- ---- 341.5/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------- ---- 343.4/385.2 MB 50.4 MB/s eta 0:00:01\n",
      "   ----------------------------------- --- 345.7/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ----------------------------------- --- 348.0/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ----------------------------------- --- 350.2/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ----------------------------------- --- 352.7/385.2 MB 50.1 MB/s eta 0:00:01\n",
      "   ----------------------------------- --- 355.0/385.2 MB 54.7 MB/s eta 0:00:01\n",
      "   ------------------------------------ -- 357.0/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ------------------------------------ -- 359.4/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ------------------------------------ -- 361.6/385.2 MB 54.7 MB/s eta 0:00:01\n",
      "   ------------------------------------ -- 364.2/385.2 MB 50.4 MB/s eta 0:00:01\n",
      "   ------------------------------------- - 366.6/385.2 MB 50.4 MB/s eta 0:00:01\n",
      "   ------------------------------------- - 369.2/385.2 MB 50.4 MB/s eta 0:00:01\n",
      "   ------------------------------------- - 371.8/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ------------------------------------- - 374.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  376.5/385.2 MB 50.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  379.2/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  381.6/385.2 MB 54.7 MB/s eta 0:00:01\n",
      "   --------------------------------------  384.1/385.2 MB 54.7 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------------  385.1/385.2 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 385.2/385.2 MB 2.2 MB/s eta 0:00:00\n",
      "Downloading absl_py-2.1.0-py3-none-any.whl (133 kB)\n",
      "   ---------------------------------------- 0.0/133.7 kB ? eta -:--:--\n",
      "   ---------------------------------------- 133.7/133.7 kB 8.2 MB/s eta 0:00:00\n",
      "Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)\n",
      "Downloading flatbuffers-24.3.25-py2.py3-none-any.whl (26 kB)\n",
      "Downloading gast-0.6.0-py3-none-any.whl (21 kB)\n",
      "Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)\n",
      "   ---------------------------------------- 0.0/57.5 kB ? eta -:--:--\n",
      "   ----------------------------------- ---- 51.2/57.5 kB 2.6 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 57.5/57.5 kB 761.8 kB/s eta 0:00:00\n",
      "Downloading grpcio-1.67.0-cp312-cp312-win_amd64.whl (4.3 MB)\n",
      "   ---------------------------------------- 0.0/4.3 MB ? eta -:--:--\n",
      "   --------------------- ------------------ 2.3/4.3 MB 75.0 MB/s eta 0:00:01\n",
      "   ---------------------------------------  4.3/4.3 MB 69.9 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 4.3/4.3 MB 39.8 MB/s eta 0:00:00\n",
      "Downloading keras-3.6.0-py3-none-any.whl (1.2 MB)\n",
      "   ---------------------------------------- 0.0/1.2 MB ? eta -:--:--\n",
      "   ---------------------------------------- 1.2/1.2 MB 36.9 MB/s eta 0:00:00\n",
      "Downloading libclang-18.1.1-py2.py3-none-win_amd64.whl (26.4 MB)\n",
      "   ---------------------------------------- 0.0/26.4 MB ? eta -:--:--\n",
      "   --- ------------------------------------ 2.5/26.4 MB 81.6 MB/s eta 0:00:01\n",
      "   ------- -------------------------------- 4.8/26.4 MB 61.7 MB/s eta 0:00:01\n",
      "   ---------- ----------------------------- 7.1/26.4 MB 57.1 MB/s eta 0:00:01\n",
      "   -------------- ------------------------- 9.4/26.4 MB 54.7 MB/s eta 0:00:01\n",
      "   ------------------ --------------------- 12.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------- ----------------- 14.7/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ------------------------- -------------- 17.1/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ----------------------------- ---------- 19.6/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   --------------------------------- ------ 22.0/26.4 MB 54.7 MB/s eta 0:00:01\n",
      "   ------------------------------------- -- 24.5/26.4 MB 54.7 MB/s eta 0:00:01\n",
      "   ---------------------------------------  26.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  26.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  26.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  26.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  26.4/26.4 MB 54.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 26.4/26.4 MB 24.2 MB/s eta 0:00:00\n",
      "Downloading ml_dtypes-0.4.1-cp312-cp312-win_amd64.whl (127 kB)\n",
      "   ---------------------------------------- 0.0/127.5 kB ? eta -:--:--\n",
      "   ---------------------------------------- 127.5/127.5 kB 2.5 MB/s eta 0:00:00\n",
      "Downloading opt_einsum-3.4.0-py3-none-any.whl (71 kB)\n",
      "   ---------------------------------------- 0.0/71.9 kB ? eta -:--:--\n",
      "   ---------------------------------------  71.7/71.9 kB ? eta -:--:--\n",
      "   ---------------------------------------- 71.9/71.9 kB 1.3 MB/s eta 0:00:00\n",
      "Downloading tensorboard-2.17.1-py3-none-any.whl (5.5 MB)\n",
      "   ---------------------------------------- 0.0/5.5 MB ? eta -:--:--\n",
      "   -------------------- ------------------- 2.8/5.5 MB 88.9 MB/s eta 0:00:01\n",
      "   ------------------------------------ --- 5.0/5.5 MB 64.3 MB/s eta 0:00:01\n",
      "   ---------------------------------------  5.5/5.5 MB 58.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  5.5/5.5 MB 58.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------  5.5/5.5 MB 58.4 MB/s eta 0:00:01\n",
      "   ---------------------------------------- 5.5/5.5 MB 25.1 MB/s eta 0:00:00\n",
      "Downloading termcolor-2.5.0-py3-none-any.whl (7.8 kB)\n",
      "Downloading tensorboard_data_server-0.7.2-py3-none-any.whl (2.4 kB)\n",
      "Downloading namex-0.0.8-py3-none-any.whl (5.8 kB)\n",
      "Downloading optree-0.13.0-cp312-cp312-win_amd64.whl (283 kB)\n",
      "   ---------------------------------------- 0.0/283.5 kB ? eta -:--:--\n",
      "   --------------------------------------- 283.5/283.5 kB 17.1 MB/s eta 0:00:00\n",
      "Installing collected packages: namex, libclang, flatbuffers, termcolor, tensorboard-data-server, optree, opt-einsum, ml-dtypes, grpcio, google-pasta, gast, astunparse, absl-py, tensorboard, keras, tensorflow-intel, tensorflow\n",
      "Successfully installed absl-py-2.1.0 astunparse-1.6.3 flatbuffers-24.3.25 gast-0.6.0 google-pasta-0.2.0 grpcio-1.67.0 keras-3.6.0 libclang-18.1.1 ml-dtypes-0.4.1 namex-0.0.8 opt-einsum-3.4.0 optree-0.13.0 tensorboard-2.17.1 tensorboard-data-server-0.7.2 tensorflow-2.17.0 tensorflow-intel-2.17.0 termcolor-2.5.0\n"
     ]
    }
   ],
   "source": [
    "!pip install tensorflow"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "729ca531-650b-412b-88b1-b51da2467447",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train.shape= (50000, 32, 32, 3)\n",
      "y_train.shape= (50000, 1)\n",
      "x_test.shape= (10000, 32, 32, 3)\n",
      "y_test.shape= (10000, 1)\n"
     ]
    }
   ],
   "source": [
    "#导入所需要的模块与包\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "#导入Cifar-10数据集，将训练集和测试机存储在相应的变量中\n",
    "cifar10=tf.keras.datasets.cifar10\n",
    "(x_train,y_train),(x_test,y_test)=cifar10.load_data()\n",
    "#转换特征值的数据类型并进行标准化处理\n",
    "x_train,x_test=tf.cast(x_train,dtype=tf.float32)/255.0,tf.cast(x_test,dtype=tf.float32)/255.0\n",
    "#转化标签值的数据类型\n",
    "y_train,y_test=tf.cast(y_train,dtype=tf.int32),tf.cast(y_test,dtype=tf.int32)\n",
    "#显示数据集的特征值和标签值的shape属性值\n",
    "print(\"x_train.shape=\",x_train.shape)\n",
    "print(\"y_train.shape=\",y_train.shape)\n",
    "print(\"x_test.shape=\",x_test.shape)\n",
    "print(\"y_test.shape=\",y_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "99d6f3c1-80ac-464b-87ed-f1e2305226b1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">Model: \"sequential_3\"</span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[1mModel: \"sequential_3\"\u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓\n",
       "┃<span style=\"font-weight: bold\"> Layer (type)                         </span>┃<span style=\"font-weight: bold\"> Output Shape                </span>┃<span style=\"font-weight: bold\">         Param # </span>┃\n",
       "┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩\n",
       "│ conv2d_8 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)                    │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)          │             <span style=\"color: #00af00; text-decoration-color: #00af00\">896</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ max_pooling2d_8 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)          │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_13 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>)                 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>)          │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ conv2d_9 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Conv2D</span>)                    │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)          │          <span style=\"color: #00af00; text-decoration-color: #00af00\">18,496</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ max_pooling2d_9 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">MaxPooling2D</span>)       │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)          │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_14 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>)                 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">32</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">64</span>)          │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ flatten_3 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Flatten</span>)                  │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">65536</span>)               │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_9 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dense</span>)                      │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)                 │      <span style=\"color: #00af00; text-decoration-color: #00af00\">33,554,944</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_15 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>)                 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">512</span>)                 │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_10 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dense</span>)                     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)                 │         <span style=\"color: #00af00; text-decoration-color: #00af00\">131,328</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_16 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dropout</span>)                 │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">256</span>)                 │               <span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_11 (<span style=\"color: #0087ff; text-decoration-color: #0087ff\">Dense</span>)                     │ (<span style=\"color: #00d7ff; text-decoration-color: #00d7ff\">None</span>, <span style=\"color: #00af00; text-decoration-color: #00af00\">10</span>)                  │           <span style=\"color: #00af00; text-decoration-color: #00af00\">2,570</span> │\n",
       "└──────────────────────────────────────┴─────────────────────────────┴─────────────────┘\n",
       "</pre>\n"
      ],
      "text/plain": [
       "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓\n",
       "┃\u001b[1m \u001b[0m\u001b[1mLayer (type)                        \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1mOutput Shape               \u001b[0m\u001b[1m \u001b[0m┃\u001b[1m \u001b[0m\u001b[1m        Param #\u001b[0m\u001b[1m \u001b[0m┃\n",
       "┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩\n",
       "│ conv2d_8 (\u001b[38;5;33mConv2D\u001b[0m)                    │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m)          │             \u001b[38;5;34m896\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ max_pooling2d_8 (\u001b[38;5;33mMaxPooling2D\u001b[0m)       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m)          │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_13 (\u001b[38;5;33mDropout\u001b[0m)                 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m)          │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ conv2d_9 (\u001b[38;5;33mConv2D\u001b[0m)                    │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m64\u001b[0m)          │          \u001b[38;5;34m18,496\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ max_pooling2d_9 (\u001b[38;5;33mMaxPooling2D\u001b[0m)       │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m64\u001b[0m)          │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_14 (\u001b[38;5;33mDropout\u001b[0m)                 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m32\u001b[0m, \u001b[38;5;34m64\u001b[0m)          │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ flatten_3 (\u001b[38;5;33mFlatten\u001b[0m)                  │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m65536\u001b[0m)               │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_9 (\u001b[38;5;33mDense\u001b[0m)                      │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m512\u001b[0m)                 │      \u001b[38;5;34m33,554,944\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_15 (\u001b[38;5;33mDropout\u001b[0m)                 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m512\u001b[0m)                 │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_10 (\u001b[38;5;33mDense\u001b[0m)                     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m)                 │         \u001b[38;5;34m131,328\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dropout_16 (\u001b[38;5;33mDropout\u001b[0m)                 │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m256\u001b[0m)                 │               \u001b[38;5;34m0\u001b[0m │\n",
       "├──────────────────────────────────────┼─────────────────────────────┼─────────────────┤\n",
       "│ dense_11 (\u001b[38;5;33mDense\u001b[0m)                     │ (\u001b[38;5;45mNone\u001b[0m, \u001b[38;5;34m10\u001b[0m)                  │           \u001b[38;5;34m2,570\u001b[0m │\n",
       "└──────────────────────────────────────┴─────────────────────────────┴─────────────────┘\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Total params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">33,708,234</span> (128.59 MB)\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[1m Total params: \u001b[0m\u001b[38;5;34m33,708,234\u001b[0m (128.59 MB)\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">33,708,234</span> (128.59 MB)\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[1m Trainable params: \u001b[0m\u001b[38;5;34m33,708,234\u001b[0m (128.59 MB)\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\"> Non-trainable params: </span><span style=\"color: #00af00; text-decoration-color: #00af00\">0</span> (0.00 B)\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[1m Non-trainable params: \u001b[0m\u001b[38;5;34m0\u001b[0m (0.00 B)\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#构建网络模型\n",
    "model=tf.keras.models.Sequential([\n",
    "#创建卷积层\n",
    "tf.keras.layers.Conv2D(32,kernel_size=(3,3),padding='same',activation=tf.nn.relu,input_shape=x_train.shape[1:]),\n",
    "tf.keras.layers.MaxPool2D(pool_size=(2,2),strides=(1,1),padding='same'),  #创建最大池化层\n",
    "tf.keras.layers.Dropout(0.2),   #创建Dropout层\n",
    "tf.keras.layers.Conv2D(64,kernel_size=(3,3),padding='same',activation=tf.nn.relu),   #创建卷积层\n",
    "tf.keras.layers.MaxPool2D(pool_size=(2,2),strides=(1,1),padding='same'),     #创建最大池化层\n",
    "tf.keras.layers.Dropout(0.2),     #创建Dropout层\n",
    "tf.keras.layers.Flatten(),       #创建拉伸层\n",
    "#创建全连接层\n",
    "tf.keras.layers.Dense(512,activation='relu'),\n",
    "tf.keras.layers.Dropout(0.2),     #创建Dropout层\n",
    "#创建全连接层\n",
    "tf.keras.layers.Dense(256,activation='relu'),\n",
    "tf.keras.layers.Dropout(0.5),     #创建Dropout层\n",
    "#创建全连接层作为输出层\n",
    "tf.keras.layers.Dense(10,activation='softmax')\n",
    "])\n",
    "model.summary()    #显示模型各层的参数状况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ef7c63a7-b0c3-4c5e-94ab-db03346b20ab",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m189s\u001b[0m 596ms/step - loss: 2.1513 - sparse_categorical_accuracy: 0.2587 - val_loss: 1.4309 - val_sparse_categorical_accuracy: 0.5014\n",
      "Epoch 2/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m186s\u001b[0m 593ms/step - loss: 1.3846 - sparse_categorical_accuracy: 0.5006 - val_loss: 1.2276 - val_sparse_categorical_accuracy: 0.5704\n",
      "Epoch 3/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m187s\u001b[0m 596ms/step - loss: 1.1663 - sparse_categorical_accuracy: 0.5875 - val_loss: 1.0302 - val_sparse_categorical_accuracy: 0.6347\n",
      "Epoch 4/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m186s\u001b[0m 595ms/step - loss: 0.9942 - sparse_categorical_accuracy: 0.6502 - val_loss: 1.0079 - val_sparse_categorical_accuracy: 0.6379\n",
      "Epoch 5/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m185s\u001b[0m 592ms/step - loss: 0.8706 - sparse_categorical_accuracy: 0.6959 - val_loss: 0.9480 - val_sparse_categorical_accuracy: 0.6698\n",
      "Epoch 6/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m190s\u001b[0m 606ms/step - loss: 0.7593 - sparse_categorical_accuracy: 0.7350 - val_loss: 0.9265 - val_sparse_categorical_accuracy: 0.6838\n",
      "Epoch 7/10\n",
      "\u001b[1m313/313\u001b[0m \u001b[32m━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[37m\u001b[0m \u001b[1m183s\u001b[0m 585ms/step - loss: 0.6512 - sparse_categorical_accuracy: 0.7684 - val_loss: 0.9445 - val_sparse_categorical_accuracy: 0.6848\n",
      "Epoch 8/10\n",
      "\u001b[1m137/313\u001b[0m \u001b[32m━━━━━━━━\u001b[0m\u001b[37m━━━━━━━━━━━━\u001b[0m \u001b[1m1:48\u001b[0m 619ms/step - loss: 0.5612 - sparse_categorical_accuracy: 0.8039"
     ]
    }
   ],
   "source": [
    "#编译网络模型\n",
    "model.compile(optimizer='adam',\n",
    "             loss=tf.keras.losses.SparseCategoricalCrossentropy(),\n",
    "             metrics=['sparse_categorical_accuracy'])\n",
    "#训练网络模型\n",
    "hisory=model.fit(x_train,y_train,batch_size=128,epochs=10,validation_split=0.2)\n",
    "#评估网络模型\n",
    "model.evaluate(x_test,y_test,batch_size=64,verbose=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1c48df13-5aee-4f86-b98a-78988b86dc43",
   "metadata": {},
   "outputs": [],
   "source": [
    "loss=history.history['loss']\n",
    "acc=history.history['sparse_categorical_accuracy']\n",
    "val_loss=history.history['val_loss']\n",
    "val_acc=history.history['val_sparse_categorical_accuracy']\n",
    "plt.figure(figsize=(10,3))\n",
    "plt.subplot(121)\n",
    "plt.plot(loss,color='b',label='train')\n",
    "plt.plot(val_loss,color='r',label='validate')\n",
    "plt.ylabel('loss')\n",
    "plt.legend()\n",
    "plt.subplot(122)\n",
    "plt.plot(acc,color='b',label='train')\n",
    "plt.plot(val_acc,color='r',label='validate')\n",
    "plt.ylabel('Accuracy')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "86afe69e-e5cc-42c3-a954-db5d03ef34d3",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.figure()\n",
    "for i in range(10):\n",
    "    n=np.random.randint(1,10000)\n",
    "    plt.subplot(2,5,i+1)\n",
    "    plt.axis(\"off\")\n",
    "    plt.rcParams['font.sans-serif']=['SimHei']\n",
    "    plt.imshow(x_test[n],cmap='gray')\n",
    "    demo=tf.rreshape(x_test[n],(1,32,32,3))\n",
    "    y_pred=np.argmax(model.predict(demo))\n",
    "    title=\"标签值:\"+str((y_test.numpy())[n,0])+\"\\n 预测值:\"+str(y_pred)\n",
    "    plt.title(title)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
